/**
 * <p>Title: FSysUserAuthService.java</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2017</p>
 * <p>Company: http://www.richfit.com/</p>
 *
 * @author Administrator
 * @date 2019年10月28日
 * @version 1.0
 */
package com.rf.richfitwheel.outbill.feignclient;


import com.rf.richfitwheel.admin.annotation.UserOperateLog;
import com.rf.richfitwheel.common.utils.R;
import com.rf.richfitwheel.workflow.entity.WfTaskParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


@FeignClient(name = "richfitwheel-workflow-server/wftask")
public interface FWfTaskService {

    /**
     * 获取用户信息
     *
     * @param wfTaskParam
     * @return
     */
    @GetMapping("/submitTask")
    R submitTask(@RequestBody WfTaskParam wfTaskParam);

    /**
     * 删除运行中流程
     * <p>Title: deleteProcess</p>
     * <p>Description: </p>
     *
     * @param params
     * @return
     */
    @UserOperateLog(module = "工作流", methods = "deleteProcess", description = "终止流程流程")
    @GetMapping("/deleteProcess")
    public R deleteProcess(@RequestParam Map<String, Object> params);

    /**
     * 根据流程实例id查询流程处理记录
     *
     * @param processInstanceId
     * @return
     */
    @GetMapping("/getHistoryTaskByProcessInstanceId/{processInstanceId}")
    R getHistoryTaskByProcessInstanceId(@PathVariable("processInstanceId") String processInstanceId);

    /**
     * 发起人撤回
     * <p>Title: restart</p>
     * <p>Description: </p>
     *
     * @param params
     * @return
     * @throws Exception
     */
    @UserOperateLog(module = "工作流", methods = "restart", description = "发起人撤回流程")
    @GetMapping("/restart")
    R restart(@RequestParam Map<String, Object> params);

}
